package model.agent.service;

import model.agent.entity.Agent;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.domain.Sort;
import org.springframework.test.context.junit4.SpringRunner;
import java.util.List;

/**
 * Created by Administrator on 2019/6/25.
 */
@RunWith(SpringRunner.class)
@SpringBootTest
public class testagent {
    @Autowired
    private IAgentService iAgentService;
    @Test
    public void test(){
        List<Agent> agentList=iAgentService.findall();
        System.out.println(agentList);
    }
    @Test
    public void test01(){
        List<Agent> agentList= iAgentService.getByAddress("");
        System.out.println(agentList);

    }
    @Test
    public void test03(){
     iAgentService.del("tang");


    }
    @Test
    public void test04(){

        List<Agent> result=iAgentService.findsort();
       for(Agent agent:result){
           System.out.println(agent.toString());
       }

    }

}
